package com.cn.study008;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName Test8013.java
 * @Description
 * @createTime 2023年05月14日 20:11:00
 */
public class Test8013 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        double[] score = new double[4];      //成绩
        int count=0;

        for (int i = 1; i <= 3; i++) {
            System.out.println("请输入第" + i + "个班级的成绩");
            double sum = 0;       //总成绩
            for (int j = 0; j < 4; j++) {
                System.out.print("第" + (j+1) + "位学员的成绩:");
                score[j] = sc.nextDouble();
                sum = sum + score[j];
                if (score[j]>=85){
                    count++;
                    continue;
                }
            }
            System.out.println("第" + i + "个班级的成绩总和为"+sum);
            double avg = sum / 4;
            System.out.println("参赛学员的平均分是：" + avg+"\n");
        }
        System.out.println("成绩85分以上的学员人数有"+count+"人");
    }
}
